﻿using Microsoft.SharePoint;

namespace SPRepository
{
    public static class ContentTypeUtilities
    {
        public static bool IsContentTypeDirectParentOf(SPContentType childContentType, string idParent)
        {
            var contentTypeIdParent = new SPContentTypeId(idParent);

            return childContentType.Parent.Id.Equals(contentTypeIdParent);
        }
    }
}